/*    */ package com.zimbra.cs.account.accesscontrol.fallback;
/*    */ 
/*    */ import com.zimbra.common.service.ServiceException;
/*    */ import com.zimbra.cs.account.Account;
/*    */ import com.zimbra.cs.account.Entry;
/*    */ import com.zimbra.cs.account.accesscontrol.CheckRightFallback;
/*    */ import com.zimbra.cs.mailbox.OperationContext;
/*    */ import com.zimbra.cs.mailbox.acl.FolderACL;
/*    */ import com.zimbra.cs.util.Zimbra;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class InviteFallback
/*    */   extends CheckRightFallback
/*    */ {
/*    */   protected Boolean doCheckRight(Account authedAcct, Entry target, boolean asAdmin)
/*    */     throws ServiceException
/*    */   {
/* 39 */     if (!Zimbra.started()) {
/* 40 */       return null;
/*    */     }
/* 42 */     if (!(target instanceof Account)) {
/* 43 */       return null;
/*    */     }
/* 45 */     Account targetAcct = (Account)target;
/*    */     
/* 47 */     OperationContext octxt = new OperationContext(authedAcct, asAdmin);
/*    */     
/* 49 */     int defaultCalendarfolderId = 10;
/*    */     
/* 51 */     FolderACL folderACL = new FolderACL(octxt, targetAcct, defaultCalendarfolderId, Boolean.FALSE);
/*    */     
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/* 63 */     short rightsNeeded = 15;
/* 64 */     boolean hasRights = folderACL.canAccess(rightsNeeded);
/*    */     
/* 66 */     if (hasRights) {
/* 67 */       return Boolean.TRUE;
/*    */     }
/* 69 */     return null;
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/account/accesscontrol/fallback/InviteFallback.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */